package com.biostime.terminal.util;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 说明
 * </p>
 *
 * @author yangrzh 2014/6/6
 */
public class ResultMessage implements ResultCode {

    private static Map<Integer, String> rm = new HashMap<Integer, String>();

    static {
        rm.put(Commons.SUCCESS, "操作成功");
        rm.put(Commons.NOT_FOUNT, "找不到结果");
        rm.put(Commons.ARGS_ERROR, "参数错误");

        rm.put(SKU.MUST_HAVE_BASE_CATEGORY, "SKU必须具有基础分类");
    }

    /**
     * 获取状态信息
     * @param resultCode
     * @return
     */
    public static String getMessage(int resultCode) {
        if ((resultCode % 1000) == 001) {
            return "内部错误";
        }
        return rm.get(resultCode);
    }

}
